# has_ticket = int(input("请确认是否有票(0/非0)："))     #0没票
# if has_ticket:
#     knife_length = int(input("请输入刀的长度："))
#     if knife_length >=20:
#         print("不允许上车")
#     else:
#         print("安检通过，允许上车")
# else:
#     print("不允许进门")

has_ticket = int(input("请确认是否有票(0/非0)："))     #0没票
if has_ticket:
    knife_length = int(input("请输入刀的长度："))
    if knife_length >=20:
        print("不允许上车")
    else:
        print("安检通过，允许上车")
else:
    print("不允许进门")